﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PurchaseOrderView.aspx.cs" Inherits="Main_Inventory_ViewPurchaseOrder" EnableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControl" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<%@ Register Src="~/User Controls/Pager.ascx" TagPrefix="custom" TagName="Pager" %>
<%@ Register Src="~/User Controls/CommonControls.ascx" TagName="CommonControls" TagPrefix="MyControls" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>View Purchase Order</title>
    <link href="../../Styles/accounts.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <acc:heading ID="pagehead" runat="server" HeadingText="Purchase Order" />
    <div style="width:90%; margin-left:5%; margin-right:5%">
    <div style=" padding-top:15px; padding-bottom:5px; margin-left:30%;">  
        <div style="float:left;">
            <custom:Pager ID="custPager" runat="server" OnPageChanged="custPager_PageChanged" />
        </div>
        <div style="float:left; margin-left:10px;">  
            <MyControls:CommonControls ID="CommonControls2" runat="server" GridviewControlId="grdDisplay" HideColumns="8,9" /> 
        </div>
    </div> 
    <asp:Label ID="lblMsg" runat="server"></asp:Label>
    <div id="divprint" runat="server">
        <asp:GridView ID="grdDisplay" Width="100%" runat="server" AutoGenerateColumns="false" CssClass="gridview"
         AllowPaging="true" DataKeyNames="POID"  
            AlternatingRowStyle-CssClass="gridview_alternate" PagerStyle-CssClass="pgr"
         OnPageIndexChanging="grdDisplay_OnPageIndexChanging"  
            RowStyle-CssClass="gridviewitem" FooterStyle-CssClass="gridviewitem" 
         onrowcommand="grdDisplay_RowCommand" onrowdatabound="grdDisplay_RowDataBound" 
            onrowcreated="grdDisplay_RowCreated" >
            <Columns>
                <asp:TemplateField HeaderText="S.No." ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <%# Container.DataItemIndex+1 %>                        
                    </ItemTemplate>
                </asp:TemplateField>
                <%--<asp:TemplateField HeaderText="P.O. No.">
                    <ItemTemplate>
                        <a href="#" onclick="window.open('ServiceInvoicePrint/PurchaseOrderReport.aspx?Poid=<%#DataBinder.Eval(Container.DataItem,"POID")%>','','width=800,height=600,toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes')"><%#Eval("PONO")%></a>
                    </ItemTemplate>
                </asp:TemplateField>--%>
                <asp:BoundField HeaderText="P.O.No." DataField="PONO" />
                <asp:BoundField HeaderText="P.O. Date" DataField="PODATE" DataFormatString="{0:dd-MMM-yyyy}" />               
                <asp:BoundField HeaderText="Vendor Name" DataField="LNAME" />
                <asp:BoundField HeaderText="Total Amount" DataField="TotalAmt" ItemStyle-HorizontalAlign="Right"/>
                <asp:TemplateField HeaderText="Details" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <a href="#" onclick="window.open('ServiceInvoicePrint/PurchaseOrderReport.aspx?Poid=<%#DataBinder.Eval(Container.DataItem,"POID")%>','','width=800,height=600,toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes')">View</a>                         
                    </ItemTemplate>
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="Action" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                       <asp:LinkButton ID="lnkEdit" CommandArgument='<%#Eval("POID") %>' CommandName="editpo" runat="server" Font-Underline="false" ><img src="../../Menu/images/Edit_user.png" alt="Edit"/></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>                              
               
            </Columns>
        </asp:GridView> 
        </div>   
    </div>
    </form>
</body>
</html>
